import { _decorator, Component, Node } from 'cc';
import EvtManger from '../tools/EvtManger';
import { AppControll, EventName } from '../manager/AppControll';
const { ccclass, property } = _decorator;

@ccclass('ExitGame')
export class ExitGame extends Component {
    protected onLoad(): void {
        AppControll.Platform.ShowIniterstitalAd();
    }

    OnClose() {
        this.node.destroy();
    }

    OnConfirm() {
        EvtManger.do(EventName.exitLevel);
        this.node.destroy();
    }
}


